<?php

/**
 * Subclass for representing a row from the 'kernel.icono' table.
 *
 * 
 *
 * @package plugins/kernel/lib.model
 */ 
class KernelIcono extends BaseKernelIcono
{
	/**
	 * Initializes internal state of KernelIcono object.
	 * @see        parent::__construct()
	 */
	public function __construct()
	{
		// Make sure that parent constructor is always invoked, since that
		// is where any default values for this object are set.
		parent::__construct();
	}


    public function __toString()
    {
        return $this->getNombre();
    }

    public function obtenerNombreArchivo()
    {
        return $this->getNombre().".".$this->getTipo();
    }
    

    
    public function getPath()
    {
       return "/".$this->getUbicacion().$this->obtenerNombreArchivo();
    }

    public function getImagen($prop='')
    {
        return image_tag( $this->getPath(), $prop);
    }
}
